package com.soecode.lyf.controller;

import java.text.ParseException;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.soecode.lyf.entity.Dept;
import com.soecode.lyf.service.DeptService;


/**
 * Created by lijie on 16/11/17.
 */
@Controller
@RequestMapping("/input")
public class InputController {
    Logger logger = LoggerFactory.getLogger(InputController.class);

	@Autowired
	DeptService deptService;
    
    @RequestMapping(value = "/personRecord", method=RequestMethod.GET)
    public ModelAndView forCarinfo(HttpServletRequest request) throws ParseException{
		List<Dept> deptList = deptService.queryAllDept();
		ModelAndView mad = new ModelAndView("inputInfo/personRecord");
		mad.addObject("deptList", deptList);
		return mad;
    }
    
    @RequestMapping(value = "/personRecordDownload", method=RequestMethod.GET)
	public ModelAndView forWashBeauty(HttpServletRequest request) throws ParseException{
		List<Dept> deptList = deptService.queryAllDept();
		ModelAndView mad = new ModelAndView("inputInfo/personRecordDownload");
		mad.addObject("deptList", deptList);
		return mad;
    }
    
}
